<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <link rel="stylesheet" href="layui/css/layui.css">
</head>

<body>

    <div id="test1"></div>

    <script src="layui/layui.all.js"></script>
    <script>
        var laypage = layui.laypage;
        laypage.render({
            elem: 'test1',
            count: 100, // 数据总数，从服务端得到
            limit: 10,
            theme: '#a109c8',
            // layout: ['count', 'prev', 'page', 'next', 'limit', 'refresh', 'skip'],
            jump: function (obj, first) {
                // obj包含了当前分页的所有参数，比如：
                // console.log(obj);

                // 当前第几页
                console.log(obj.curr);

                // 得到每页显示的条数
                console.log(obj.limit);
            }
        })
    </script>
</body>

</html>